home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / MPW Related / MPW Interfaces / PInterfaces / FixMath.p < prev    next >
Encoding:
Text File  |  1993-09-17  |  1.6 KB  |  83 lines  |  [TEXT/MPS ]

  1. {
  2.     File:        FixMath.p
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. }
  11.  
  12. {$IFC UNDEFINED UsingIncludes}
  13. {$SETC UsingIncludes := 0}
  14. {$ENDC}
  15.  
  16. {$IFC NOT UsingIncludes}
  17.     UNIT FixMath;
  18.     INTERFACE
  19. {$ENDC}
  20.  
  21. {$IFC UNDEFINED UsingFixMath}
  22. {$SETC UsingFixMath := 1}
  23.  
  24. {$I+}
  25. {$SETC FixMathIncludes := UsingIncludes}
  26. {$SETC UsingIncludes := 1}
  27. {$IFC UNDEFINED UsingTypes}
  28. {$I $$Shell(PInterfaces)Types.p}
  29. {$ENDC}
  30. {$SETC UsingIncludes := FixMathIncludes}
  31.  
  32.  
  33. FUNCTION Fix2Frac(x: Fixed): Fract;
  34.     INLINE $A841;
  35. FUNCTION Fix2Long(x: Fixed): LONGINT;
  36.     INLINE $A840;
  37. FUNCTION FixATan2(x: LONGINT;y: LONGINT): Fixed;
  38.     INLINE $A818;
  39. FUNCTION Long2Fix(x: LONGINT): Fixed;
  40.     INLINE $A83F;
  41. FUNCTION Frac2Fix(x: Fract): Fixed;
  42.     INLINE $A842;
  43.     
  44. {$IFC OPTION(MC68881)}
  45.  
  46. FUNCTION Frac2X(x: Fract): Extended;
  47. FUNCTION Fix2X(x: Fixed): Extended;
  48. FUNCTION X2Fix(x: Extended): Fixed;
  49. FUNCTION X2Frac(x: Extended): Fract;
  50.  
  51. {$ELSEC}
  52.  
  53. FUNCTION Frac2X(x: Fract): Extended;
  54.     INLINE $A845;
  55. FUNCTION Fix2X(x: Fixed): Extended;
  56.     INLINE $A843;
  57. FUNCTION X2Fix(x: Extended): Fixed;
  58.     INLINE $A844;
  59. FUNCTION X2Frac(x: Extended): Fract;
  60.     INLINE $A846;
  61.  
  62. {$ENDC}
  63.  
  64. FUNCTION FracMul(x: Fract;y: Fract): Fract;
  65.     INLINE $A84A;
  66. FUNCTION FixDiv(x: Fixed;y: Fixed): Fixed;
  67.     INLINE $A84D;
  68. FUNCTION FracDiv(x: Fract;y: Fract): Fract;
  69.     INLINE $A84B;
  70. FUNCTION FracSqrt(x: Fract): Fract;
  71.     INLINE $A849;
  72. FUNCTION FracSin(x: Fixed): Fract;
  73.     INLINE $A848;
  74. FUNCTION FracCos(x: Fixed): Fract;
  75.     INLINE $A847;
  76.  
  77. {$ENDC}    { UsingFixMath }
  78.  
  79. {$IFC NOT UsingIncludes}
  80.     END.
  81. {$ENDC}
  82.  
  83.